<template>
<div>
<Header></Header>
    <div class="list_banner" style="background-image: url(lib/images/list_banner_1.jpg);"></div>
    <div class="detail_box">
        <p class="t_name" v-html="detail.title"></p>
        <p class="time">发布时间：{{detail.createDate}}</p>
        <div class="con" v-html="detail.content">
        </div>
    </div>
    <Footer></Footer>
</div>
</template>
<script>
import common from "../utils/common";
import Header from "../components/Header.vue";
import Footer from "../components/Footer.vue";
export default {
	components: {
    Header,Footer
    },
    activated () {
        this.id = this.$route.params.id
        this.init(this.id)
    },
    mounted () {
        this.id = this.$route.params.id
        this.init(this.id)
    },
	methods: {
		init: function(id) {
			$("#hdyj").addClass("on");
			var self = this;
			var url = common.getApiPrefix() + "api/portal/web/article/info/" + id;
			common.doGet(url,function(data){
				self.detail = data;
			});
		}
	},
	data: function() {
		return {
			detail: {}
		};
	}
};
</script>